<template>
  <div>
    首页
  </div>
</template>
<script>
export default {

  created() {
    const otherRoutes = [
      {
        path: 'xxx',
        name: 'Xxx',
        val: 'aaa'
        // aaa
      },
      {
        path: 'xxx2',
        name: 'Xxx2',
        val: 'bbb'
        // bbb
      },
      {
        path: 'xxx3',
        name: 'Xxx3',
        val: 'ccc'
        // ccc
      }
    ]
    const menus = ['ccc']
    const newArr = otherRoutes.filter(item => {
      if (menus.includes(item.val)) {
        return true
      }
    })
    console.log('menus', newArr)
  }

}
</script>
<style>
</style>
